home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / ien / ien-116 < prev    next >
Text File  |  1988-12-01  |  14KB  |  523 lines

  1.  
  2.  
  3. IEN 116                                                        J. Postel
  4.                                                                      ISI
  5.                                                              August 1979
  6. Obsoletes: 89, 61
  7.  
  8.  
  9.  
  10.                           INTERNET NAME SERVER
  11.                           --------------------
  12.  
  13. INTRODUCTION
  14. ------------
  15.  
  16. This memo defines the procedure to access an Internet Name Server.  Such
  17. a server  provides  the actual  addresses  of hosts in the internet when
  18. supplied  with a host name.   An  Internet  Name  Server  is  a  dynamic
  19. name-to-number translation service.
  20.  
  21. This server utilizes the User Datagram Protocol (UDP) [2], which in turn
  22. calls on the Internet Protocol (IP) [3].
  23.  
  24. NAME SYNTAX
  25. -----------
  26.  
  27. It is strongly  recommended  that the use of host names  in programs  be
  28. consistent  for both input and output across all hosts.  To promote such
  29. consistency of the internet level, the following syntax is specified:
  30.  
  31. The SYNTAX  of names as presented to the user and as entered by the user
  32. is:
  33.  
  34.   ! NET ! REST
  35.  
  36.   where:
  37.  
  38.     NET is a network name or number as defined in "Assigned Numbers" [1]
  39.  
  40.   and
  41.  
  42.     REST is a host name within  that network  expressed  as a  character
  43.     string  or as a number.   When  a number is used, it is expressed in
  44.     decimal and is prefixed with a sharp sign (e.g., #1234).
  45.  
  46.   Note that this syntax  has minimal  impact  on the allowable character
  47.   strings for host names within a network.  The only restriction is that
  48.   a REST string cannot begin with an exclamation point (!).
  49.  
  50.   The !NET!  may be omitted when specifying a host in the local network.
  51.   That is "!" indicates the network portion of a name string.
  52.  
  53.  
  54.  
  55.  
  56.  
  57. Postel                                                          [page 1]
  58.  
  59.  
  60.                                                              August 1979
  61. Internet Name Server                                             IEN 116
  62.  
  63.  
  64.  
  65. BASIC NAME SERVER
  66. -----------------
  67.  
  68. To aid in the translation  of names to internet  addresses, several name
  69. server  processes will be provided.  The name server process will accept
  70. a name in the above form and will return a name, address pair.
  71.  
  72. The name server processes will have well-known addresses; addresses that
  73. are constant  over long periods  of time and published in documents such
  74. as "Assigned Numbers" [1].
  75.  
  76. A request  sent to a name server is sent as a user datagram [2] with the
  77. following content:
  78.  
  79.     +--------+--------+--------+--------+--------+--------+---\\---+
  80.     |        |        |                                            |
  81.     |  NAME  | LENGTH |                NAME STRING                 |
  82.     |        |        |                                            |
  83.     +--------+--------+--------+--------+--------+--------+---\\---+
  84.  
  85.   where:
  86.  
  87.     NAME is a one octet code indicating that the following is a name,
  88.  
  89.     LENGTH  is a one octet  count  of the number  of octets  in the name
  90.     string, and
  91.  
  92.     NAME STRING is an ASCII character string of the form ! NET ! REST.
  93.  
  94. A reply  to a successful translation is sent as a user datagram with the
  95. following content:
  96.  
  97.     +--------+--------+--------+--------+--------+--------+---\\---+
  98.     |        |        |                                            |
  99.     |  NAME  | LENGTH |                NAME STRING                 |
  100.     |        |        |                                            |
  101.     +--------+--------+--------+--------+--------+--------+---\\---+
  102.     |        |        |                                   |         
  103.     | ADDRESS| LENGTH |         INTERNET ADDRESS          |         
  104.     |        |        |                                   |         
  105.     +--------+--------+--------+--------+--------+--------+         
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. [page 2]                                                          Postel
  116.  
  117.  
  118. August 1979
  119. IEN 116                                             Internet Name Server
  120.  
  121.  
  122.  
  123.   where:
  124.  
  125.     ADDRESS  is a one octet  code indicating  that the following  is  an
  126.     internet address,
  127.  
  128.     LENGTH  is a one octet  count  (=4)  of the length  of the  internet
  129.     address, and
  130.  
  131.     INTERNET ADDRESS is the internet address.
  132.  
  133. Actually  a particular  name might map to several internet addresses, in
  134. this case the response would include a list of internet addresses.
  135.  
  136. When  a name  is not found,  an error is reported via a user datagram as
  137. follows:
  138.  
  139.     +--------+--------+--------+--------+--------+--------+---\\---+
  140.     |        |        |                                            |
  141.     |  NAME  | LENGTH |                NAME STRING                 |
  142.     |        |        |                                            |
  143.     +--------+--------+--------+--------+--------+--------+---\\---+
  144.     |        |        |  ERROR |                                   |
  145.     | ERROR  | LENGTH |  CODE  |       ERROR STRING                |
  146.     |        |        |        |                                   |
  147.     +--------+--------+--------+--------+--------+--------+---\\---+
  148.  
  149.   where:
  150.  
  151.     ERROR CODE specifies the error.
  152.  
  153.     ERROR STRING explains the error.
  154.  
  155. Error Codes
  156.  
  157.   The following error codes are defined:
  158.  
  159.     CODE          MEANING
  160.     ----          -------
  161.      0            Undetermined or undefined error
  162.      1            Name not found
  163.      2            Improper name syntax
  164.  
  165. Communication with a Name Server Process
  166.  
  167.   Communication  with a name server process is via user datagrams.  User
  168.   datagrams   do  not  guarantee  reliable  communication.   Thus,  some
  169.   requests or replies may be lost.
  170.  
  171.  
  172.  
  173. Postel                                                          [page 3]
  174.  
  175.  
  176.                                                              August 1979
  177. Internet Name Server                                             IEN 116
  178.  
  179.  
  180.  
  181.   The  name  server   process   is  a  transaction   oriented   process;
  182.   furthermore,  the  nature  of  the  transactions  allows  them  to  be
  183.   processed in any order and even to be duplicated.  This allows the use
  184.   of a very simple communication protocol.
  185.  
  186.   If a request  is made to the name server  process  and no response  is
  187.   received  within a reasonable time, then the requester should make the
  188.   request  again.   This recovers  from communication errors which cause
  189.   the loss of either the request or the reply.
  190.  
  191.   In order  to use this simple  strategy,  care must be taken  to  allow
  192.   replies to be properly matched with requests.  The name server process
  193.   does this by including in each reply a copy of the entire request.
  194.  
  195.   The user datagram  protocol  does provide a checksum for the detection
  196.   of errors.
  197.  
  198. Format
  199.  
  200.   The requests and replies to and from a name server process are encoded
  201.   as "items".   An item consists  of an item-code an item-length and the
  202.   item-data.   The item-length  includes in its count the item-count and
  203.   the item-length octets.
  204.  
  205.     Item  :=  Item-Code  Item-Length  Item-Data
  206.  
  207.     +--------+--------+--------+--------+--------+--------+---\\---+
  208.     |        |        |                                            |
  209.     |  Item  |  Item  |               Item                         |
  210.     |  Code  | Length |                      Data                  |
  211.     |        |        |                                            |
  212.     +--------+--------+--------+--------+--------+--------+---\\---+
  213.  
  214.   A request is typically one item, and a reply is typically two items.
  215.  
  216.                                     
  217.                  +--------+--------+--------+--------+
  218.                  |ItemCode|Item Len|... Item Data ...|
  219.                  +--------+--------+--------+--------+
  220.                  | ......... Item Data cont ........ |
  221.                  +--------+--------+--------+--------+
  222.                  | Item Data cont. |ItemCode|Item Len|
  223.                  +--------+--------+--------+--------+
  224.                  | ........... Item Data ........... |
  225.                  +--------+--------+--------+--------+
  226.  
  227.  
  228.  
  229.  
  230.  
  231. [page 4]                                                          Postel
  232.  
  233.  
  234. August 1979
  235. IEN 116                                             Internet Name Server
  236.  
  237.  
  238.  
  239. Item Code Value Assignments:
  240.  
  241.   NAME    = 1
  242.  
  243.   ADDRESS = 2
  244.  
  245.   ERROR   = 3
  246.  
  247. Example
  248.  
  249.   a typical request:
  250.  
  251.                                     
  252.                  +-----------------+--------+--------+
  253.                  |   1    |   12   |   !    |   A    |
  254.                  +--------+--------+--------+--------+
  255.                  |   R    |   P    |   A    |   !    |
  256.                  +--------+--------+--------+--------+
  257.                  |   I    |   S    |   I    |   B    |
  258.                  +--------+--------+--------+--------+
  259.  
  260.   and the reply:
  261.  
  262.                                     
  263.                  +-----------------+--------+--------+
  264.                  |   1    |   12   |   !    |   A    |
  265.                  +--------+--------+--------+--------+
  266.                  |   R    |   P    |   A    |   !    |
  267.                  +--------+--------+--------+--------+
  268.                  |   I    |   S    |   I    |   B    |
  269.                  +--------+--------+--------+--------+
  270.                  |   2    |   6    |   10   |   3    |
  271.                  +--------+--------+--------+--------+
  272.                  |   0    |   52   |                  
  273.                  +--------+--------+                  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289. Postel                                                          [page 5]
  290.  
  291.  
  292.                                                              August 1979
  293. Internet Name Server                                             IEN 116
  294.  
  295.  
  296.  
  297. EXTENDED NAME SERVER
  298. --------------------
  299.  
  300. Several  extensions  have been  proposed  [4],  the  following  two  are
  301. adopted:  partially specified names, and a service field.
  302.  
  303. In the first extension  partially  specified  names are allowed  and are
  304. indicated by the use of "wild card" fields or characters.
  305.  
  306. Wild Card Field         Meaning
  307. ---------------         -------
  308.       *                 All
  309.       ~                 Local (Same as that of the requestor)
  310.  
  311. Wild Card Character     Meaning
  312. ---------------         -------
  313.       *                 Any substring
  314.  
  315. Examples:
  316.  
  317.   !~!*      all hosts on the net of the requestor.
  318.  
  319.   !*!SRI*   all hosts with names whose first three characters
  320.             are SRI on all nets
  321.  
  322. In general,  there  are three cases for each of the net and host fields.
  323. Using  the symbols  N for named network and H for named host the 9 cases
  324. are:
  325.  
  326.   !~!~   local net, local host
  327.  
  328.   !~!*   local net, all hosts
  329.  
  330.   !~!H   local net, named host
  331.  
  332.   !*!~   all nets,  local host
  333.  
  334.   !*!*   all nets,  all hosts
  335.  
  336.   !*!H   all nets,  named host
  337.  
  338.   !N!~   named net, local host
  339.  
  340.   !N!*   named net, all hosts
  341.  
  342.   !N!H   named net, named host
  343.  
  344.  
  345.  
  346.  
  347. [page 6]                                                          Postel
  348.  
  349.  
  350. August 1979
  351. IEN 116                                             Internet Name Server
  352.  
  353.  
  354.  
  355. When such a request  is processed  and  the  result  is  more  than  one
  356. name/address pair, the response is all the pairs.
  357.  
  358. Examples:
  359.  
  360.   1)
  361.  
  362.     request:
  363.  
  364.       !ARPA!ISI*
  365.  
  366.     response:
  367.  
  368.       !ARPA!ISIA  10 1 0 22
  369.  
  370.       !ARPA!ISIB  10 3 0 52
  371.  
  372.       !ARPA!ISIC  10 2 0 22
  373.  
  374.       !ARPA!ISID  10 3 0 22
  375.  
  376.       !ARPA!ISIE  10 1 0 52
  377.  
  378.   2)
  379.  
  380.     request:
  381.  
  382.       !~!SRI-R2D2
  383.  
  384.     response:
  385.  
  386.       !ARPA!SRI-R2D2    10 3 0 51
  387.  
  388.       !SF-PR-1!SRI-R2D2  2 0 0 11
  389.  
  390.   3)
  391.  
  392.     request:
  393.  
  394.       !*!ISIA
  395.  
  396.     response:
  397.  
  398.       !ARPA!ISIA  10 1 0 22
  399.  
  400. The second  extension is that a third field may be appended to the name.
  401. This is the SERVICE field.
  402.  
  403.  
  404.  
  405. Postel                                                          [page 7]
  406.  
  407.  
  408.                                                              August 1979
  409. Internet Name Server                                             IEN 116
  410.  
  411.  
  412.  
  413.   ! NET ! HOST ! SERVICE
  414.  
  415. To reply  to a request  of this form the name server  must  provide  the
  416. internet  address  (net and host),  the protocol  number,  and the  port
  417. number.
  418.  
  419.     +--------+--------+--------+--------+--------+--------+---\\---+
  420.     |        |        |                                            |
  421.     |  NAME  | LENGTH |                NAME STRING                 |
  422.     |        |        |                                            |
  423.     +--------+--------+--------+--------+--------+--------+---\\---+
  424.     |        |        |                                   |         
  425.     | ADDRESS| LENGTH |         INTERNET ADDRESS          |         
  426.     |        |        |                                   |         
  427.     +--------+--------+--------+--------+--------+--------+         
  428.     |        |        |        |                                    
  429.     |PROTOCOL|       PORT      |                                    
  430.     |        |        |        |                                    
  431.     +--------+--------+--------+                                    
  432.  
  433. Examples:
  434.  
  435.   1)
  436.  
  437.     request:
  438.  
  439.       !ARPA!ISIA!TELNET
  440.  
  441.     response:
  442.  
  443.       !ARPA!ISIA!TELNET  10 1 0 22 6 0 23
  444.  
  445.   2)
  446.  
  447.     request:
  448.  
  449.       !ARPA!*!NAME-SERVER
  450.  
  451.     response:
  452.  
  453.       !ARPA!SRI-KL!NAME-SERVER  10 1 0 2 17 42
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. [page 8]                                                          Postel
  464.  
  465.  
  466. August 1979
  467. IEN 116                                             Internet Name Server
  468. References
  469.  
  470.  
  471.  
  472. References
  473. ----------
  474.  
  475. [1]     J. Postel. "Assigned Numbers," IEN 117, USC/Information Sciences
  476.         Institute, August 1979.
  477.  
  478. [2]     J. Postel.  "User Datagram  Protocol,"  IEN 88,  USC/Information
  479.         Sciences Institute, May 1979.
  480.  
  481. [3]     J. Postel.   "Internet   Protocol,"   IEN 111,   USC/Information
  482.         Sciences Institute, August 1979.
  483.  
  484. [4]     J. Pickens, E. Feinler, and J. Mathis. "The NIC Name Server -- A
  485.         Datagram  Based Information  Utility," Proceedings of the Fourth
  486.         Berkeley  Conference on Distributed Data Management and Computer
  487.         Networks, pp. 275-283, August 1979.
  488.  
  489.  
  490.  
  491. Acknowledgments
  492. ---------------
  493.  
  494. John Pickens contributed the ideas for the Extended Name Server.
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521. Postel                                                          [page 9]
  522.  
  523.